<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>特效</title>
    <script type="text/javascript"  src="http://apps.bdimg.com/libs/jquery/1.11.3/jquery.min.js"> </script>

    <script>
        function show() {
            $("button").hide();

            $("button").fadeTo("slow",1,function () {
                alert("渐变完成")
            });

            $("p").animate({width:'650px',left:'100px'},"slow",function () {
                alert("自定义动画完成")
            });
            $("#p1").stop();
        }
    </script>


</head>
<body onload="show();">
<button id="btn1">btn1</button>
<button id="btn2">btn2</button>
<p style="background-color: red">
    动画段落
</p>
<p style="background-color: green" id="p1">
    无动画段落
</p>
</body>
</html>